package com.ztej.query.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.CheckBox;
import android.widget.LinearLayout;

import com.ztej.query.R;

public class DepartmentActivity extends Activity {

    private CheckBox cbWindCenter, cbWindGroup, cbHrqm, cbLAJX, cbJRZX, cbHXQX, cbXTDSY,
            cbZFJT, cbZXJA, cbHRYG, cbXZSCY, cbRZSWKJ;
    private LinearLayout llOrganization, llWind, llSpecial, llHrqm, llLAJX, llJRZX, llHXQX,
            llXTDSY, llZFJT, llZXJA, llHRYG, llXZSCY, llRZSWKJ;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_department);
        initViews();

        llOrganization.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = new Intent(DepartmentActivity.this, StaffActivity.class);
                startActivity(intent);
            }
        });

        cbWindCenter.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (cbWindCenter.isChecked()){
                    llWind.setVisibility(View.VISIBLE);
                }else {
                    llWind.setVisibility(View.GONE);
                }
            }
        });

        cbWindGroup.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (cbWindGroup.isChecked()){
                    llSpecial.setVisibility(View.VISIBLE);
                }else {
                    llSpecial.setVisibility(View.GONE);
                }
            }
        });

        cbHrqm.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (cbHrqm.isChecked()){
                    llHrqm.setVisibility(View.VISIBLE);
                }else {
                    llHrqm.setVisibility(View.GONE);
                }
            }
        });

        cbLAJX.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (cbLAJX.isChecked()){
                    llLAJX.setVisibility(View.VISIBLE);
                }else {
                    llLAJX.setVisibility(View.GONE);
                }
            }
        });

        cbJRZX.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (cbJRZX.isChecked()){
                    llJRZX.setVisibility(View.VISIBLE);
                }else {
                    llJRZX.setVisibility(View.GONE);
                }
            }
        });

        cbHXQX.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (cbHXQX.isChecked()){
                    llHXQX.setVisibility(View.VISIBLE);
                } else {
                    llHXQX.setVisibility(View.GONE);
                }
            }
        });

        cbXTDSY.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (cbXTDSY.isChecked()){
                    llXTDSY.setVisibility(View.VISIBLE);
                } else {
                    llXTDSY.setVisibility(View.GONE);
                }
            }
        });

        cbZFJT.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (cbZFJT.isChecked()){
                    llZFJT.setVisibility(View.VISIBLE);
                } else {
                    llZFJT.setVisibility(View.GONE);
                }
            }
        });

        cbZXJA.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (cbZXJA.isChecked()){
                    llZXJA.setVisibility(View.VISIBLE);
                } else {
                    llZXJA.setVisibility(View.GONE);
                }
            }
        });

        cbHRYG.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (cbHRYG.isChecked()){
                    llHRYG.setVisibility(View.VISIBLE);
                } else {
                    llHRYG.setVisibility(View.GONE);
                }
            }
        });

        cbXZSCY.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (cbXZSCY.isChecked()){
                    llXZSCY.setVisibility(View.VISIBLE);
                } else {
                    llXZSCY.setVisibility(View.GONE);
                }
            }
        });

        cbRZSWKJ.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                if (cbRZSWKJ.isChecked()){
                    llRZSWKJ.setVisibility(View.VISIBLE);
                } else {
                    llRZSWKJ.setVisibility(View.GONE);
                }
            }
        });








    }

    private void initViews(){
        llOrganization = (LinearLayout) findViewById(R.id.llOrganization);
        cbWindCenter = (CheckBox) findViewById(R.id.cbWindCenter);
        llWind = (LinearLayout)findViewById(R.id.llWind);
        cbWindGroup = (CheckBox) findViewById(R.id.cbWindGroup);
        llSpecial= (LinearLayout) findViewById(R.id.llSpecial);
        cbHrqm = (CheckBox) findViewById(R.id.cbHrqm);
        llHrqm = (LinearLayout) findViewById(R.id.llHrqm);
        cbLAJX = (CheckBox) findViewById(R.id.cbLAJX);
        llLAJX = (LinearLayout) findViewById(R.id.llLAJX);
        cbJRZX = (CheckBox) findViewById(R.id.cbJRZX);
        llJRZX = (LinearLayout) findViewById(R.id.llJRZX);
        cbHXQX = (CheckBox) findViewById(R.id.cbHXQX);
        llHXQX = (LinearLayout) findViewById(R.id.llHXQX);
        cbXTDSY = (CheckBox) findViewById(R.id.cbXTDSY);
        llXTDSY = (LinearLayout) findViewById(R.id.llXTDSY);
        cbZFJT = (CheckBox) findViewById(R.id.cbZFJT);
        llZFJT = (LinearLayout) findViewById(R.id.llZFJT);
        cbZXJA = (CheckBox) findViewById(R.id.cbZXJA);
        llZXJA = (LinearLayout) findViewById(R.id.llZXJA);
        cbHRYG = (CheckBox) findViewById(R.id.cbHRYG);
        llHRYG = (LinearLayout) findViewById(R.id.llHRYG);
        cbXZSCY = (CheckBox) findViewById(R.id.cbXZSCY);
        llXZSCY = (LinearLayout) findViewById(R.id.llXZSCY);
        cbRZSWKJ = (CheckBox) findViewById(R.id.cbRZSWKJ);
        llRZSWKJ = (LinearLayout) findViewById(R.id.llRZSWKJ);
    }




}
